//5-10
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function (app) {
  app.use(
    // 设置路径
    '/home', createProxyMiddleware({
      target: 'https://home-api.pinduoduo.com',
      changeOrigin: true,
    })
  );
  app.use(
    '/wp-json', createProxyMiddleware({
      target: 'http://mobile.pinduoduo.com/',
      changeOrigin: true,
    })
  );
  //5-11
  app.use(
    '/api', createProxyMiddleware({
      target: 'http://api.bdplus.cn/',
      changeOrigin: true,
    })
  );
};
